<?php

namespace Database\Seeders;

use App\Models\User;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;

class UserSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        User::factory(10)->create();
        $user = User::first();
        $user->name = "admin";
        $user->mobile = "18888888888";
        $user->password = Hash::make("admin999");
        $user->role = "admin";
        $user->save();

        $user = User::where("id",2)->first();
        $user->name = "user";
        $user->mobile = "18888888889";
        $user->password = Hash::make("admin999");
        $user->role = "user";
        $user->save();
    }
}
